
public class OperatorDemo {

	public static void main(String[] args) {
		// Assignment Operator
		int a = 5;
		int b = 9;
		boolean isMale = true;
		
		//if condition
		if(a == b)
		{
			System.out.println("a and b are same");
		}
		else
		{
			System.out.println("a and b are not same");
		}
		
		//Logical OR expression
		if(a == 5 || b == 8)
		{
			System.out.println("a is either 5 or b is 8");
		}
		
		//Logical AND operator
		if(a == 5 && b == 9)
		{
			System.out.println("a is 5 and b is 3");
		}
		
		if(b != 8)
		{
			System.out.println("b is not 8");
		}
		
		if(!isMale)
		{
			System.out.println("Not male");
		}
		
		System.out.println(" a + " + a);
		a +=2;
		
		System.out.println(" a = " +a);
		
		b ++; // this is equal to b = b+1
		
		System.out.println(" b = " + b);
	}

}
